package cn.chi.user.controller;



import cn.chi.user.service.IWxUserService;
import cn.chi.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wxUser")
public class WxUserController {
    @Autowired
    private IWxUserService wxUserService;

    /**
     * 登录
     * @param map
     * @return
     */
    @PostMapping("/wxUserLogin")
    public AjaxResult wxUserLogin(@RequestBody Map<String,String> map){
        System.out.println(map);
        return wxUserService.wxLogin(map);
    }

    /**
     * 验证入库登录
     * @param map
     * @return
     */
    @PostMapping("/bind")
    public AjaxResult bind(@RequestBody Map<String,String> map){
        System.out.println(map);
        return wxUserService.bind(map);
    }

}
